<?php
include_once("connect.php");
if (isset($_POST['nom']))
   $nom=$_POST['nom'];
else
    $nom="";
    
if (isset($_POST['prenom']))
   $prenom=$_POST['prenom'];
else
    $prenom="";
?>
<div class='part'>
  <title>recherche de client
  </title>
  <form action=".?page=client" method="post">
    </br>
    <label>nom :  
    </label>
    <input type="text" size="30" name="nom" value="" />
    </br>
    <p>
      <label>prenom :  
      </label>
      <input type="text" size="30" name="prenom" value="" />
      </br>
      </br>
      <input type="submit" value="Envoyer" />
      </br>
      </br>
      </br>
  </form>
  </p>
</div>
<div class=part>
<?php
$result=mysql_query("SELECT * FROM `ap3_sp_utilisateur` where ID!=0 and Nom LIKE '%".$nom."%' and Prenom LIKE '%".$prenom."%' order by 'nom'asc");
echo "<table>";
echo "<tr id='hautTab'><td>nom</td><td>prenom</td><td>telephone</td><td>adresse</td><td>code postal</td><td> ville </td></tr>";
while($user=mysql_fetch_assoc($result)) {
     echo "<tr><td>".$user['Nom']."</td><td>".$user['Prenom']."</td><td>".$user['telephone']."</td><td>".$user['adresse']."</td><td>".$user['cp']."</td><td>".$user['ville']."</td></tr>";
}
echo "</table>";
  ?>
</div>